//
//  HJMineAccountHeader.m
//  Sneakers
//
//  Created by 胡光健 on 2017/9/25.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "HJMineAccountHeader.h"
@interface HJMineAccountHeader()
@property (weak, nonatomic) IBOutlet UILabel *allMoney;// 总金额
@property (weak, nonatomic) IBOutlet UILabel *withdrawal;// 提现
@property (weak, nonatomic) IBOutlet UILabel *freeze;//冻结

@end
@implementation HJMineAccountHeader

-(instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self = [[[NSBundle mainBundle]loadNibNamed:@"HJMineAccountHeader" owner:nil options:nil]lastObject];
        self.frame = frame;
    }
    return self;
}
-(void)setModel:(HJUserModel *)model {
    _model = model;
    self.allMoney.text = [NSString stringWithFormat:@"%.2f",model.money.doubleValue +model.forzen_money.doubleValue];
    self.withdrawal.text = model.money.length > 0 ? model.money : @"0.00";
    self.freeze.text = model.forzen_money.length >0 ? model.forzen_money : @"0.00";
    
}
@end
